<?php
declare(strict_types=1);

namespace app\api\controller;

use aphp\core\Jump;

class Base
{
    use Jump;

    // 处理跨域
    public function __construct()
    {
        header('Access-Control-Allow-Origin: *'); // 允许源域名
        header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization'); // 允许请求头
        header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS'); // 允许请求类型
    }
}